<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
ini_set('session.cookie_domain', 'zhixianggo.com');
if (isset($_SERVER['HTTP_ORIGIN'])) {
    header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
    header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept,Accept-Encoding,Accept-Language,Cache-Control,Connection,Cookie,Host,Pragma,Referer,User-Agent,UA,AUTHORIZATION");
    header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE');
    header("Access-Control-Allow-Credentials: true");
}
// [ 应用入口文件 ]

// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
define('EXTEND_PATH', __DIR__ . '/../extend/');

define('STATIC_PATH', __DIR__ . '/static/');

define('CERT_PATH', __DIR__ . '/../certification/');
define('HTTP_PROTOCOL',
    ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) ? "https://" : "http://");

// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
